

select GLDate, SUM(ExtendedPrice)  FROM dbo.JDESOSalesOrderDetailHistory
where GLDate >= CONVERT(datetime, '2010-05-01 00:00:00', 120)
and GLDate <= CONVERT(datetime, '2010-05-16 00:00:00', 120)

group by GLDATE
